<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
		<title>头部页面</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<style>
* {
	font-size: 12px;
	font-family: 微软雅黑, 黑体, 宋体;
	color: #f0eee1;
}

body {
	padding: 0;
	margin: 0;
}

body,html {
	overflow: hidden;
}

.sysInfoDiv,.userInfoDiv {
	padding-right: 12px;
	text-align: right;
}

.sysInfoDiv {
	margin-top: 15px;
	white-space: nowrap;
}

.userInfoDiv {
	margin-top: 30px;
	white-space: nowrap;
}

#mainTable td {
	padding: 0;
	margin: 0;
}

#mainTable {
	padding: 0;
	margin: 0;
	border-bottom: 1px solid #3E6210;
}
</style>
	</head>

	<BODY>
		<table style="width: 100%; border-collapse: collapse;" cellspacing="0"
			cellpadding="0" id="mainTable">
			<tr>
				<td style="width: 487px;">
					<div
						style="width: 487px; height: 88px; background: url(images/top_02.gif);"></div>
				</td>
				<td style="background: url(images/top_03.gif); vertical-align: top;">
					<div class="sysInfoDiv">
						<span style="">&nbsp;&nbsp;&nbsp;&nbsp;</span>
						<span id="nowDate"></span>

					</div>
					<div class="userInfoDiv">
						<span>当前用户：<%=session.getAttribute("userName")%></span>
						<span>|</span>
						<span>用户类型：<%=session.getAttribute("organization")%></span>
						<span>|</span>
						<a onclick="return(confirm('确定要退出吗？'));"
							href="<%=basePath%>logoutServlet.do" target="_top">退出系统</a>
					</div>
				</td>
			</tr>
		</table>
	</BODY>
</HTML>

<script>
var serverTime = new Date();//(<%=new java.util.Date().getTime()%>);
function show() {
	serverTime.setSeconds(serverTime.getSeconds() + 1);
	var now = "当前时间：";
	now = serverTime.getFullYear() + "年"; //读英文就行了
	now = now + (serverTime.getMonth() + 1) + "月"; //取月的时候取的是当前月-1如果想取当前月+1就可以了
	now = now + serverTime.getDate() + "日&nbsp;&nbsp;";
	now = now + serverTime.getHours() + "时";
	now = now + serverTime.getMinutes() + "分";
	now = now + serverTime.getSeconds() + "秒";
	document.getElementById("nowDate").innerHTML = now; //div的html是now这个字符串 
}
setInterval("show()", 1000); //设置过1000毫秒就是1秒，调用show方法
</script>